<%@ page language="java" import="java.util.*,com.cornergj.model.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="cl"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<c:set var="ctx" value="<%=request.getContextPath()%>"/>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>Corner家政 --联系我们</title>
    <!-- core CSS -->
    <link href="${ctx}/css/bootstrap.min.css" rel="stylesheet">
    <link href="${ctx}/css/font-awesome.min.css" rel="stylesheet">
    <link href="${ctx}/css/prettyPhoto.css" rel="stylesheet">
    <link href="${ctx}/css/animate.min.css" rel="stylesheet">
    <link href="${ctx}/css/responsive.css" rel="stylesheet">
    <link rel="shortcut icon" type="image/x-icon" href="${ctx}/favicon/favicon.ico"/>
    <!--[if lt IE 9]>
    <script src="js/html5shiv.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->
    <script type="text/javascript">
	//如果不是顶级窗口，则先获取顶级窗口，再跳转到登录界面
	if(!(window.parent == window)){
		var topWin= (function (p,c){
		    while(p!=c){
		        c = p        
		        p = p.parent
		    }
		    return c
		})(window.parent,window);
		topWin.location.href='${ctx}' + "/frontpage/toindex.do";
	}
	</script>
	<style>
		.close{
			color:#000;
		}
	</style>
	<link href="${ctx}/css/main.css" rel="stylesheet">
</head><!--/head-->
<body>
   <!-- 页头信息 -->
    <%@include file='fronthead.jsp'%>

    <section id="contact-info">
        <div class="center">                
            <h2>如何联系我们?</h2>
            <p class="lead">欢迎您到达我们的分店咨询，参观，学习</p>
        </div>
        <div class="gmap-area">
            <div class="container">
                <div class="row">
                    <div class="col-sm-5 text-center">
                        <div class="gmap">
                            <iframe frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://ditu.amap.com/"></iframe>
                        </div>
                    </div>

                    <div class="col-sm-6 map-content">
                        <ul class="row">
                            	<c:forEach items="${branchAddresslist}" var="item" varStatus="status">
                            		<c:if test="${status.count%2 == '0'}">
                            			<li class="col-sm-6">
                            				<address>
                                    			<h5>${item.name}</h5>
                                    			<p>${item.address}</p>
                                    			<p>联系电话:${item.phone}<br>邮箱地址:${item.email}</p>
               	                			</address>
                            			</li>
                            		</c:if>
                            		<c:if test="${status.count%2 != '0'}">
                            			<li class="col-sm-6">
                            				<address>
                                    			<h5>${item.name}</h5>
                                    			<p>${item.address}</p>
                                    			<p>联系电话:${item.phone}<br>邮箱地址:${item.email}</p>
               	                			</address>
                            			</li>
                            		</c:if>
                            	</c:forEach>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </section>  <!--/gmap_area -->

    <section id="contact-page">
        <div class="container">
            <div class="center">        
                <h2>留下您的问题，我们的客服将会回复您</h2>
                <p class="lead">填写您的联系方式与问题，方便客服人员进行联系</p>
            </div> 
            <div class="row contact-wrap"> 
                <div class="status alert alert-success" style="display: none"></div>
                <form id="main-contact-form" class="contact-form" role="form" method="get" action="${ctx}/submitquestion/question.do">
                    <div class="col-sm-5 col-sm-offset-1">
                        <div class="form-group">
                            <label style="color:#000">姓名：</label>
                            <input type="text" name="name" class="form-control" required="required">
                        </div>
                        <div class="form-group">
                            <label style="color:#000">邮箱 ：</label>
                            <input type="email" name="email" class="form-control" required="required">
                        </div>
                        <div class="form-group">
                            <label style="color:#000">手机号码：</label>
                            <input type="text" name="phone" class="form-control" required="required">
                        </div>
                    </div>
                    <div class="col-sm-5">
                        <div class="form-group">
                            <label style="color:#000">性别：</label>
                            <select name="sex" class="form-control" required="required">
      							<option value="0">男</option>
      							<option value="1">女</option>
      						</select>
                        </div>
                        <div class="form-group">
                            <label style="color:#000">您的问题：</label>
                            <textarea name="question" id="question" required="required" class="form-control" rows="5" required="required"></textarea>
                        </div>                        
                        <div class="form-group">
                            <button type="submit" name="submit" class="btn GJBlackbutton btn-lg" required="required">提交问题</button>
                        </div>
                    </div>
                </form> 
            </div><!--/.row-->
        </div><!--/.container-->
    </section><!--/#contact-page-->
    <!-- 登录模块 -->
    <%@include file="loginmodel.jsp"%>
    <!-- 页脚模块 -->
   	<%@include file="frontfoot.jsp"%>
 	<!-- 上传头像模块 -->
	<%
  		if(session.getAttribute("COMMONUSER")!=null){
  	%>
  		<%@include file='uploadAvatar.jsp'%>
  	<%
		}
	 %>
    <script src="${ctx}/js/jquery.js"></script>
    <script src="${ctx}/js/bootstrap.min.js"></script>
    <script src="${ctx}/js/jquery.prettyPhoto.js"></script>
    <script src="${ctx}/js/jquery.isotope.min.js"></script>
    <script src="${ctx}/js/main.js"></script>
    <script src="${ctx}/js/wow.min.js"></script>
    <script src="${ctx }/static/assets/js/jquery.form.js"></script>
    <script type="text/javascript">
    	$("#main-contact-form").submit(function() {
   			
   			preventDefault(); //阻止表单默认提交
		});
    </script>
</body>
</html>